<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>资讯中心</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">

		<link rel="stylesheet" href="../css/mui.min.css">
		<link rel="stylesheet" href="../css/liveapp.css" />
		<script type="text/javascript" src="../js/iconfont.js"></script>
		<style>
			body {
				font-family: "microsoft yahei";
			}
			
			.iconzs {
				width: 1em;
				height: 1em;
				vertical-align: -0.15em;
				fill: currentColor;
				overflow: hidden;
			}
			/*头部*/
			
			.mui-bar {
				background-color: #313131;
				height: 0.67rem;
			}
			
			.mui-bar h1 {
				color: #FFFFFF;
				font-size: 0.3rem;
				line-height: 0.67rem;
			}
			
			.mui-segmented-control.mui-segmented-control-inverted .mui-control-item.mui-active {
				color: #13c287;
			}
			
			.mui-segmented-control.mui-segmented-control-inverted~.mui-slider-progress-bar {
				background-color: #13c287;
			}
			
			.mui-card-link .mui-icon {
				font-size: 18px;
				color: #8a8a8a;
			}
			
			.mui-card-header.mui-card-media .mui-media-body {
				font-size: 15px;
				font-weight: 500;
				line-height: 24px;
				margin-bottom: 0;
				margin-left: 0px;
				color: #333;
			}
			
			.mui-card-header.mui-card-media .mui-media-body h4 {
				font-size: 16px;
				line-height: 24px;
				width: 100%;
				color: #313131;
				position: relative;
			}
			
			.mui-card-header.mui-card-media .mui-media-body p {
				font-size: 13px;
				margin-bottom: 0;
				line-height: 20px;
				padding-top: 10px;
			}
			
			.xianqing {
				width: 0.5em;
				height: 0.5em;
				display: block;
			}
			
			.rightqj {
				display: inline-block;
			}
			
			.mui-card-footer:before,
			.mui-card-header:after {
				position: absolute;
				top: 0;
				right: 0;
				left: 0;
				height: 0px;
				content: '';
				-webkit-transform: scaleY(.5);
				transform: scaleY(.5);
				background-color: #c8c7cc;
			}
			
			.mui-card-header:after {
				top: auto;
				height: 1px;
				bottom: 0;
				width: 90%;
				margin: 0 auto;
				text-align: center;
			}
			
			.mui-card {
				margin: 10px 10px !important;
				border-radius: 5px;
			}
			
			.zixuntit {
				background: #5092e4;
				height: 7em;
				width: 100%;
				border-radius: 8px;
			}
			
			.zixuntit .iconzs {
				font-size: 50px;
				margin-top: 20px;
			}
			
			.zixuntit .ltit {
				line-height: 40px;
				color: #FFFFFF;
			}
			
			.mui-table-view.mui-grid-view .mui-table-view-cell.active {
				margin-top: -10px;
			}
			
			.mui-bar~.mui-content .mui-fullscreen {
				/*top: 44px;*/
				height: auto;
			}
			
			.mui-content {
				background: #EEEEEE;
			}
			
			.mui-pull-top-tips {
				position: absolute;
				top: -20px;
				left: 50%;
				margin-left: -25px;
				width: 40px;
				height: 40px;
				border-radius: 100%;
				z-index: 11;
			}
			
			.mui-bar~.mui-pull-top-tips {
				top: 24px;
			}
			
			.mui-pull-top-wrapper {
				width: 42px;
				height: 42px;
				display: block;
				text-align: center;
				background-color: #efeff4;
				border: 1px solid #ddd;
				border-radius: 25px;
				background-clip: padding-box;
				box-shadow: 0 4px 10px #bbb;
				overflow: hidden;
			}
			
			.mui-pull-top-tips.mui-transitioning {
				-webkit-transition-duration: 200ms;
				transition-duration: 200ms;
			}
			
			.mui-pull-top-tips .mui-pull-loading {
				/*-webkit-backface-visibility: hidden;
				-webkit-transition-duration: 400ms;
				transition-duration: 400ms;*/
				margin: 0;
			}
			
			.mui-pull-top-wrapper .mui-icon,
			.mui-pull-top-wrapper .mui-spinner {
				margin-top: 7px;
			}
			
			.mui-pull-top-wrapper .mui-icon.mui-reverse {
				/*-webkit-transform: rotate(180deg) translateZ(0);*/
			}
			
			.mui-pull-bottom-tips {
				text-align: center;
				background-color: #efeff4;
				font-size: 15px;
				line-height: 40px;
				color: #777;
			}
			
			.mui-pull-top-canvas {
				overflow: hidden;
				background-color: #fafafa;
				border-radius: 40px;
				box-shadow: 0 4px 10px #bbb;
				width: 40px;
				height: 40px;
				margin: 0 auto;
			}
			
			.mui-pull-top-canvas canvas {
				width: 40px;
			}
			
			.mui-slider-indicator.mui-segmented-control {
				background-color: #FFFFFF;
			}
			
			.mui-card {
				font-size: 14px;
				position: relative;
				overflow: hidden;
				margin: 10px;
				border-radius: 2px;
				background-color: #fff;
				background-clip: padding-box;
				box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
			}
		</style>

		<body>
			<header class="mui-bar mui-bar-nav">

				<h1 class="mui-title">社区</h1>

			</header>
			<div class="mui-content">
				<div id="slider" class="mui-slider">

					<div id="sliderSegmentedControl" class="mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
						<a class="mui-control-item mui-active" href="#item1mobile">
							动态
						</a>
						<a class="mui-control-item" href="#item2mobile">
							圈子
						</a>
						<a class="mui-control-item" href="#item3mobile">
							广场
						</a>

						<a class="mui-control-item" href="#item4mobile">
							排行榜
						</a>

					</div>

					<div id="sliderProgressBar" class="mui-slider-progress-bar mui-col-xs-3"></div>

					<div class="mui-slider-group mui-fullscreen">
						<div id="item1mobile" class="mui-slider-item mui-control-content mui-active" style="height: 11.36rem;">
							<div id="scroll1" class="mui-scroll-wrapper">
								<div class="mui-scroll">
									<div class="content">
										
										<div class="mui-content shequ_news" >
						
									<ul class="mui-table-view">

										

										<li class="mui-table-view-cell mui-media new_help_li">
											<a href="javascript:;">
												
												<div class="mui-media-body new_help_div">
													<p class='mui-ellipsis mui-row'>
														<span class="mui-col-sm-1"><img src="../images/muwu.jpg" class="usericon"></span>
														<span class="username mui-col-sm-6">名字不能超过6位</span>
														<span class="index_newtime mui-col-sm-5">2017-10-22</span>
													</p>
													<p class="new_help_tit">这是怎么了？急死人了，前辈们帮我看一下吧!!!</p>
													<div class="new_help_img mui-row">
														<p class="mui-col-sm-4"><img src="../images/shuijiao.jpg" ></p>
														<p class="mui-col-sm-4"><img src="../images/shuijiao.jpg" ></p>
														<p class="mui-col-sm-4"><img src="../images/shuijiao.jpg" ></p>
														
													</div>
												</div>
											</a>
										</li>
										
										<li class="mui-table-view-cell mui-media new_help_li">
											<a href="javascript:;">
												
												<div class="mui-media-body new_help_div">
													<p class='mui-ellipsis mui-row'>
														<span class="mui-col-sm-1"><img src="../images/muwu.jpg" class="usericon"></span>
														<span class="username mui-col-sm-6">名字不能超过6位</span>
														<span class="index_newtime mui-col-sm-5">2017-10-22</span>
													</p>
													<p class="new_help_tit">这是怎么了？急死人了，前辈们帮我看一下吧!!!</p>
													<div class="new_help_img mui-row">
														<p class="mui-col-sm-4"><img src="../images/shuijiao.jpg" ></p>
														<p class="mui-col-sm-4"><img src="../images/shuijiao.jpg" ></p>
														<p class="mui-col-sm-4"><img src="../images/shuijiao.jpg" ></p>
														
													</div>
												</div>
											</a>
										</li>
										
										
										
										<li class="mui-table-view-cell mui-media new_help_li">
											<a href="javascript:;">
												
												<div class="mui-media-body new_help_div">
													<p class='mui-ellipsis mui-row'>
														<span class="mui-col-sm-1"><img src="../images/muwu.jpg" class="usericon"></span>
														<span class="username mui-col-sm-6">名字不能超过6位</span>
														<span class="index_newtime mui-col-sm-5">2017-10-22</span>
													</p>
													<p class="new_help_tit">这是怎么了？急死人了，前辈们帮我看一下吧!!!</p>
													<div class="new_help_img mui-row">
														<p class="mui-col-sm-4"><img src="../images/shuijiao.jpg" ></p>
														<p class="mui-col-sm-4"><img src="../images/shuijiao.jpg" ></p>
														
														
													</div>
												</div>
											</a>
										</li>
										
										<li class="mui-table-view-cell mui-media new_help_li">
											<a href="javascript:;">
												
												<div class="mui-media-body new_help_div">
													<p class='mui-ellipsis mui-row'>
														<span class="mui-col-sm-1"><img src="../images/muwu.jpg" class="usericon"></span>
														<span class="username mui-col-sm-6">名字不能超过6位</span>
														<span class="index_newtime mui-col-sm-5">2017-10-22</span>
													</p>
													<p class="new_help_tit">这是怎么了？急死人了，前辈们帮我看一下吧!!!</p>
													<div class="new_help_img mui-row">
													
														<p class="mui-col-sm-4"><img src="../images/shuijiao.jpg" ></p>
														
														
													</div>
												</div>
											</a>
										</li>

									</ul>

							

						</div>
										
										
									</div>
									
								</div>
							</div>
						</div>
						
						
						
						<!--2-->
						<div id="item2mobile" class="mui-slider-item mui-control-content" style="height: 11.36rem;">
							<div id="scroll2" class="mui-scroll-wrapper">
								<div class="mui-scroll">
									<div class="content">
											<div class="mui-content shequ_news" >
						
									<ul class="mui-table-view">

										

										<li class="mui-table-view-cell mui-media new_help_li">
											<a href="javascript:;">
												
												<div class="mui-media-body new_help_div">
													<p class='mui-ellipsis mui-row'>
														<span class="mui-col-sm-1"><img src="../images/muwu.jpg" class="usericon"></span>
														<span class="username mui-col-sm-6">名字不能超过6位</span>
														<span class="index_newtime mui-col-sm-5">2017-10-22</span>
													</p>
													<p class="new_help_tit">这是怎么了？急死人了，前辈们帮我看一下吧!!!</p>
													<div class="new_help_img mui-row">
														<p class="mui-col-sm-4 mui-col-xs-4"><img src="../images/shuijiao.jpg" ></p>
														<p class="mui-col-sm-4 mui-col-xs-4"><img src="../images/shuijiao.jpg" ></p>
														<p class="mui-col-sm-4 mui-col-xs-4"><img src="../images/shuijiao.jpg" ></p>
														
													</div>
												</div>
											</a>
										</li>
										
									
										
										
										<li class="mui-table-view-cell mui-media new_help_li">
											<a href="javascript:;">
												
												<div class="mui-media-body new_help_div">
													<p class='mui-ellipsis mui-row'>
														<span class="mui-col-sm-1"><img src="../images/muwu.jpg" class="usericon"></span>
														<span class="username mui-col-sm-6">名字不能超过6位</span>
														<span class="index_newtime mui-col-sm-5">2017-10-22</span>
													</p>
													<p class="new_help_tit">这是怎么了？急死人了，前辈们帮我看一下吧!!!</p>
													<div class="new_help_img mui-row">
														<p class="mui-col-sm-4"><img src="../images/shuijiao.jpg" ></p>
														<p class="mui-col-sm-4"><img src="../images/shuijiao.jpg" ></p>
														
														
													</div>
												</div>
											</a>
										</li>
										
										<li class="mui-table-view-cell mui-media new_help_li">
											<a href="javascript:;">
												
												<div class="mui-media-body new_help_div">
													<p class='mui-ellipsis mui-row'>
														<span class="mui-col-sm-1"><img src="../images/muwu.jpg" class="usericon"></span>
														<span class="username mui-col-sm-6">名字不能超过6位</span>
														<span class="index_newtime mui-col-sm-5">2017-10-22</span>
													</p>
													<p class="new_help_tit">这是怎么了？急死人了，前辈们帮我看一下吧!!!</p>
													<div class="new_help_img mui-row">
													
														<p class="mui-col-sm-4"><img src="../images/shuijiao.jpg" ></p>
														
														
													</div>
												</div>
											</a>
										</li>

									</ul>

							

						</div>
									</div>
								</div>
							</div>
						</div>
						<div id="item3mobile" class="mui-slider-item mui-control-content" style="height: 11.36rem;">
							<div class="mui-scroll-wrapper">
								<div class="mui-scroll">
									<!-- 具体内容 -->
									<div id='LivePage'>

										33333
									</div>
								</div>
							</div>
						</div>
						<div id="item4mobile" class="mui-slider-item mui-control-content" style="height: 11.36rem;">
							<div class="mui-scroll-wrapper">
								<div class="mui-scroll">
									<div id='FinPage'>

									44444
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>

			</div>
			<!--模板-->
			<div id="model" style="display: none;">

				<div class="mui-card" data-id="${id}" onclick="openWindowWithTitle('newsneiy.html?id=${id}','文章详情')">
					<div class="mui-card-header mui-card-media">

						<div class="mui-media-body">
							<h4>${title} 
							<span class="mui-icon ">
		                    	
		                    	<svg class="iconzs xianqing fbtime" >
 									 <use xlink:href="#icon-qianjin"></use>
								</svg>
		                    	
		                   </span>	
						</h4>

							<p>${source} ${author} <span class="fbtime">${add_time}</span></p>
						</div>

					</div>

					<div class="mui-card-footer">
						<a class="mui-card-link">
							<span class="mui-icon">
		                    	
		                    	<svg class="iconzs" >
 									 <use xlink:href="#icon-zhuanfa"></use>
								</svg>
		                    	${appShareCount}
		                   </span>
						</a>
						<a class="mui-card-link">
							<span class="mui-icon">
		                    	
		                    	<svg class="iconzs" >
 									 <use xlink:href="#icon-yuedu"></use>
								</svg> 
		                    	${click}
		                   </span>
						</a>
						<a class="mui-card-link">
							<span class="mui-icon">
		                    	
		                    	<svg class="iconzs" >
 									 <use xlink:href="#icon-shoucangweixuan"></use>
								</svg>
		                    	${appCollectionCount}
		                   </span>
						</a>
					</div>
				</div>

			</div>

			<!--模板 end-->

			<script src="../js/lib/remtest.js"></script>
			<script type="text/javascript" src="../js/lib/jquery-1.10.2.min.js"></script>
			<script type="text/javascript" src="../js/xdate/xdate.js"></script>
			<script type="text/javascript" src="../js/lodash/lodash.min.js"></script>
			<script type="text/javascript" src="../js/Common.js"></script>
			<script type="text/javascript" src="../js/lib/template.js"></script>
			<script src="../js/mui.min.js"></script>
			<script src="../js/mui.pullToRefresh.js"></script>
			<script src="../js/mui.pullToRefresh.material.js"></script>
			<script>
				//jq冲突问题
				var jq = $.noConflict();

				var articlePage = 1; //精评分页
				var bookPage = 1; //书刊
				var newsLivePage = 1; //实时资讯
				mui.init({
					swipeBack: false

				});
				(function($) {
					//阻尼系数
					var deceleration = mui.os.ios ? 0.003 : 0.0009;
					$('.mui-scroll-wrapper').scroll({
						bounce: false,
						indicators: true, //是否显示滚动条
						deceleration: deceleration
					});
					$.ready(function() {

						//获得slider插件对象 
						var gallery = mui('#slider');

						/*jq('.mui-control-content').height(getWinHeight() - 90);*/

						document.querySelector('#slider').addEventListener('slide', function(event) {

							if(event.detail.slideNumber == 0) {

							} else if(event.detail.slideNumber == 1) {

							} else if(event.detail.slideNumber == 2) {

								if(document.getElementById('iframeLivePage').src.indexOf('newlive') < 0) {
									document.getElementById('iframeLivePage').src = 'newlive.html';
									document.getElementById('iframeLivePage').height = getWinHeight() - 44;

								}
								
								//gallery.slider().gotoItem(2);
							} else if(event.detail.slideNumber == 3) {
								if(document.getElementById('iframeFinPage').src.indexOf('rili_if_app') < 0) {

								}
								document.getElementById('iframeFinPage').src = 'rili_if_app.html';
								document.getElementById('iframeFinPage').height = getWinHeight() - 44;
								//gallery.slider().gotoItem(3);
							}

						});

						//中诚精评下拉刷新，上啦加载
						$(document.querySelectorAll('.mui-slider-group .mui-scroll')[0]).pullToRefresh({
							down: {
								callback: function() {
									var self = this;
									setTimeout(function() {
										articlePage = 1;
										var ul = self.element.querySelector('.content');
										ul.innerHTML = "";

										GetA(83, articlePage, self);
									}, 1000);

								}
							},
							up: {
								callback: function() {

									var self = this;
									setTimeout(function() {
										articlePage++;
										GetA(83, articlePage, self);
									}, 1000);
								}
							}
						});
						//机构观点
						$(document.querySelectorAll('.mui-slider-group .mui-scroll')[1]).pullToRefresh({
							down: {
								callback: function() {
									var self = this;
									setTimeout(function() {
										bookPage = 1;
										var ul = self.element.querySelector('.content');
										ul.innerHTML = "";

										GetA(84, bookPage, self);
									}, 1000);
								}
							},
							up: {
								callback: function() {

									var self = this;
									setTimeout(function() {
										bookPage++;
										GetA(84, bookPage, self);
									}, 1000);

								}
							}
						});
						var GetA = function(cid, page, self) {

							jq.getJSON('http://www.99990158.com/ajax/GetArticlePageList.aspx', {
								page: page,
								size: 10,
								cid: cid,
								channel: 'news',
								sort: 'add_time desc'
							}, function(res) {
								document.getElementById('ArticleList' + cid).appendChild(createFragment(res));

								try {
									if(self) {

										self.endPullDownToRefresh();

									}

								} catch(e) {
									//TODO handle the exception
									console.log(e);
								}
								try {
									if(self) {

										self.endPullUpToRefresh();
									}

								} catch(e) {
									//TODO handle the exception
									console.log(e);
								}

							});
						};

						var createFragment = function(res) {
							var t = document.getElementById('model').innerHTML;

							var fragment = document.createElement('div');

							var re = tmpl(t, res.data, tmpl_count(res.data), tmpCallBack);
							fragment.innerHTML = re;

							return fragment;

						};
						// 加载一次 中诚精评
						GetA(83, articlePage);
						GetA(84, bookPage);
						//document.getElementById('ArticleList').appendChild(GetA(83,articlePage,document.getElementById('ArticleList').querySelector('.content')) );
						// 加载一次 机构观点
						//document.getElementById('ArticleList2').appendChild(GetA(84,bookPage,document.getElementById('ArticleList2').querySelector('.content')) );

						function tmpCallBack(a, b) {

							switch(b[1]) {
								case "title":

									break;

								default:

									break;
							}
							return '';
						}
					});

					mui('.mui-scroll').on('tap', '.mui-card', function() {
						openWindowWithTitle('newsneiy.html?id=' + this.getAttribute('data-id'), '文章详情')

					});

					var sliderSegmentedControl = document.getElementById('sliderSegmentedControl');
					$('.mui-input-group').on('change', 'input', function() {
						if(this.checked) {
							sliderSegmentedControl.className = 'mui-slider-indicator mui-segmented-control mui-segmented-control-inverted mui-segmented-control-' + this.value;
							//force repaint
							sliderProgressBar.setAttribute('style', sliderProgressBar.getAttribute('style'));
						}
					});
				})(mui);

				function Change(index) {
					mui('#slider').slider().gotoItem(index);
				}
			</script>

		</body>

</html>